/*
 * @Author: wangwang 2723008256@qq.com
 * @Date: 2022-08-04 20:20:12
 * @LastEditors: wangwang 2723008256@qq.com
 * @LastEditTime: 2022-08-04 20:20:52
 * @FilePath: \jzjypc4.0\src\utils\unique.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export function unique(arr,key) {
  const res = new Map();
  return arr.filter((a) => !res.has(a[key]) && res.set(a[key], 1))
}